<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <!-- TemplateBeginEditable name="doctitle" -->
        <title><?php echo $title_for_layout ?></title>
        <link rel="stylesheet" href="/css/index.css" type="text/css" media="screen" title="no title" charset="utf-8"/>
            <link rel="stylesheet" href="/css/common.css" type="text/css" media="screen" title="no title" charset="utf-8"/>
                <?php echo $html->script('jquery-1.4.2.min.js') ?>
                <?php echo $html->script('jquery-ui-1.8.2.custom.min.js') ?>
				<?php echo $html->css('jquery-ui-1.8.2.custom.css')?>

                <?php echo $html->script('date.js') ?>
                <?php echo $html->script('jquery-ui-timepicker-addon-0.5.js') ?>

                <?php echo $html->script('dibai.js') ?>
                <?php echo $html->script('dictation.js') ?>
                <?php echo $html->css('datePicker.css') ?>
                <?php echo $html->css('uncommon.css') ?>

                <?php echo $scripts_for_layout ?>
                </head>
                <body>

                    <div id="container">
                        <div class="head">
                            <div class="logo"></div>
                            <div class="nav">
                                <ul>
                                    <li><?php echo $html->link('首页', '/') ?> </li>
                                    <li><?php echo $html->link('我的', '/mine') ?> </li>
									<li><?php echo $html->link('问答', '/questions') ?> </li>
                                    <li><?php echo $html->link('语言', '/languages') ?></li>
                                    <li><?php echo $html->link('单词', '/words') ?></li>
                                    <li><?php echo $html->link('小组', '/groups') ?> </li>
                                    <li><?php echo $html->link('活动', '/events') ?></li>
                                    <li><?php echo $html->link('职位', '/jobs') ?> </li>
                                </ul>
                            </div>
                            <div class="clear"> </div>
                        </div>
                        <!---head-->
                        <div class="top-nav">
                            <div class="container">
                                <div class="info">
                                    <?php
                                    if (isset($current_user)) {
                                        if (isset($mail_count) and $mail_count > 0) {
                                            echo $html->link("邮箱($mail_count)", '/messages');
                                        } else {
                                            echo $html->link('邮箱', '/messages');
                                        }
                                        echo $html->link($current_user['User']['username'] . '设置', '/settings');
                                        echo $html->link('退出', '/signout');
                                    }
                                    ?>

                                </div>
                            </div>
                        </div>
                        <div class="content">

                            <?php echo $content_for_layout ?>
                                    <div class="clear"> </div>

                                </div>  <!-- end content-->
                                <div class="end">
                                    <div class="end-nav"> <?php echo $html->link('关于我们', '/about') ?>  | <?php echo $html->link('fuck you', '/') ?> </div>
                        </div>

                    </div>
                    <!---container-->
                    <!---end-->
                </body>

                </html>
